package com.chixing.ih.module.programmer.mapper.provider;

import com.chixing.ih.module.programmer.pojo.Programmer;
import com.chixing.ih.util.EmptyUtil;
import org.apache.ibatis.jdbc.SQL;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @version 1.0
 * @Author MasterYan
 * @Date 2020/10/4
 * Time: 18:03
 */
public class FabulousMapperProvider {
    public String updateOne(Programmer programmer) {

        return new SQL() {{
            UPDATE("tbl_user");
            if (!EmptyUtil.isEmpty(programmer.getSupportNum())) {
                SET("support_num=#{supportNum}");
            }
            WHERE("user_id=#{programmerId}");

        }}.toString();


    }
}
